package com.fqgj.sentry.controller.rm.request;

import com.fqgj.common.utils.StringUtils;
import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-08-17 下午7:29
 */


public class EventQueryTermsRequest extends ParamsObject {
    /**
     * 开始时间
     */
    private String startDate;
    /**
     * 结束时间
     */
    private String endDate;
    /**
     * 事件id
     */
    private Long eventId;
    /**
     * 执行者
     */
    private Long executorId;
    /**
     * 执行者类型
     */
    private Integer type;

    @Override
    public void validate() {
        if (StringUtils.isEmpty(startDate) || StringUtils.isEmpty(endDate)) {
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public Long getEventId() {
        return eventId;
    }

    public EventQueryTermsRequest setEventId(Long eventId) {
        this.eventId = eventId;
        return this;
    }

    public String getStartDate() {
        return startDate;
    }

    public EventQueryTermsRequest setStartDate(String startDate) {
        this.startDate = startDate;
        return this;
    }

    public String getEndDate() {
        return endDate;
    }

    public EventQueryTermsRequest setEndDate(String endDate) {
        this.endDate = endDate;
        return this;
    }

    public Long getExecutorId() {
        return executorId;
    }

    public EventQueryTermsRequest setExecutorId(Long executorId) {
        this.executorId = executorId;
        return this;
    }

    public Integer getType() {
        return type;
    }

    public EventQueryTermsRequest setType(Integer type) {
        this.type = type;
        return this;
    }
}
